/////////////////////////////////////////////////////////////////////////// void Font_flush(void) { #ifdef __psx__ long i; long buffer; short ot_length; // // Reset fonts to TOP LEFT corner of their display windows. // for (i=0; ilength) -1; // // Set bit mode for this font texture. // bitmode = (*fontopen).bitmode; bitshift = 2-bitmode; htab = 0; if ((*fontopen).display) { display_xpos= ((*fontopen).display->s3d.pos.x>>12); display_ypos= ((*fontopen).display->s3d.pos.y>>12); } else{ display_xpos= 0; display_ypos= 0; } // Set transparent rate. if ((*fontopen).trans) transparent_rate = (*fontopen).trans-1; else transparent_rate = 0; red = RED+(*fontopen).r; if (red > 255) red=255; if (red < 0) red=0; green = GREEN+(*fontopen).g; if (green > 255)green=255; if (green < 0) green=0; blue = BLUE+(*fontopen).b; if (blue > 255) blue=255; if (blue < 0) blue=0; // // Set global_clutx & global_cluty is palette location // Get_palette_vram_location((*fontopen).pal); // // Parse through string. // firstft4 = font_next_polyft4[activeBuff]; for (i=0; string[i]; i++) { polyft4 = font_next_polyft4[activeBuff]; if (string[i] == '^') { switch (string[++i]) { case 'n': htab = 0; (*fontopen).posx = (*fontopen).window.x; (*fontopen).posy += ( (*fontopen).size_linefeed * (*fontopen).scaley) >>12; break; case 'x': // // Get length of string // j = i+1; pixils = 1; while (string[j]) { if (string[j] == '^') { ++j; if (string[j] == 'n') break; if (string[j] == 'c') j+=3; } else if (string[j] == ' ') { pixils += ((*fontopen).size_space * (*fontopen).scalex) >>12; } else { ascii = (string[j]-32); pixils += ((fontmap[ascii].w + (*fontopen).spacing) * (*fontopen).scalex) >>12; } j++; } (*fontopen).posx = (*fontopen).window.x+((*fontopen).window.w-(*fontopen).window.x)/2 - pixils/2; break; case 'r': // // Get length of string // j = i+1; pixils = 1; while (string[j]) { if (string[j] == '^') { if (string[++j] == 'n') break; } else if (string[j] if (!fontopen) { #if DEBUG_PRINT_SWITCH Debug_print(DEBUG_PRINT_SWITCH,"NULL fontopen, tried to print %s\n",string); #endif return; } if ((*fontopen).d